<template>
	<!-- 选择登录方式 -->
	<layout title="选择角色" background="#fff">
		<view class="screen" style="height: 100vh;" :style="'padding-top:' + vuex_phoneLayout.screenPaddingTop + 'px'">
			<view class="screen_setLoginType">
				<image v-if="vuex_identity === '1'" :src="getImgSrc('/login/pty1@2x.png')" style="height: 400rpx;" mode="heightFix"></image>
				<image v-else :src="getImgSrc('/login/yh1@2x.png')" style="height: 400rpx;" mode="heightFix"></image>
				<view class="screen_setLoginType_btnList">
					<view class="default-button" @tap="goTelLogin"><text>账户密码登录</text></view>
					<view class="default-button" v-if="vuex_h5Config.wechatLoginFlg === 1"  @tap="goWxLogin"><text>微信一键登录</text></view>
					<view class="register-button" @tap="goRegister"><text>新用户注册</text></view>
				</view>
			</view>
			<view class="screen-bottomFill" style="opacity: 1;" :style="'height:' + vuex_phoneLayout.ipxbottom + 'px;'">
				<!-- 用来填充导航 和 底部的多余 -->
			</view>
		</view>
	</layout>
</template>

<script>
export default {
	components:{
	},
	data() {
		return {
			navigationBarStyle: {
				background: '',
				color: 'black',
				iconText: '选择登录方式' //导航栏文字
			},
		}
	},
	onLoad(e) {
		uni.hideTabBar({})
		if(e.path && e.path!="/pages/start/index"){
			this.path = e.path
		}else{
			this.path = "/pages/index/index"
		}
	},
	onShow(){
	},
	methods: {
		goIndex(){
			if(this.path == "/pages/index/index" || this.path == "/pages/mtask/index" || this.path == "/pages/mine/index"){
				uni.navigateTo({
					url: this.path
				})
			}else{
				uni.navigateTo({
					url: "/pages/index/index"
				})
			}
		},
		goTelLogin(e){
			uni.navigateTo({
				url: '/pages/sys/login/index'
			})
		},
		goWxLogin(e){
			uni.navigateTo({
				url: '/pages/sys/login/wxLogin'
			})
		},
		goRegister(e){
			uni.navigateTo({
				url: '/pages/sys/login/inputPhone?type=reg'
			})
		},
	}
}
</script>

<style lang="scss">
	@import "@/pages/common/themeIndex.scss";
	.screen_setLoginType {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		padding-top: 85rpx;
	}
	.screen_setLoginType_btnList{
		width: 100%;
		margin-top: 200rpx;
	}
	.register-button{
		color: $base-color;
		font-size: 34rpx;
		text-align: center;
	}
	
		
</style>
